/**
 * 
 */
package model.entities;

import java.io.Serializable;
import java.util.Date;

/**
 * @author george.cabral
 *
 */
public class FeriadoId implements Serializable {

    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = -2572420672764063760L;
	private int ano;
     private Date data;


    // Constructors

    /** default constructor */
    public FeriadoId() {

    }

    
    /** full constructor */
    public FeriadoId(int ano, Date data) {
        this.ano = ano;
        this.data = data;
    }
    

   
    // Property accessors

    public int getAno() {
        return this.ano;
    }
    
    public void setAno(int ano) {
        this.ano = ano;
    }

    public Date getData() {
        return this.data;
    }
    
    public void setData(Date data) {
        this.data = data;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof FeriadoId) ) return false;
		 FeriadoId castOther = ( FeriadoId ) other; 
         
		 return (this.getAno()==castOther.getAno())
 && ( (this.getData()==castOther.getData()) || ( this.getData()!=null && castOther.getData()!=null && this.getData().equals(castOther.getData()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + this.getAno();
         result = 37 * result + ( getData() == null ? 0 : this.getData().hashCode() );
         return result;
   }   

}
